home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 7_10.lha / 7_10 / po_alert.c < prev    next >
Text File  |  1993-08-08  |  649b  |  27 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. include <process.h>
  6. include <debug.h>    /* DELETE */
  7. / schedule idle remembered processes
  8. / and flush out the memory
  9. oid process_object::alert()
  10.  
  11.    if (debug) /*DELETE*/ cerr << "process_object" << this << "::alert()\n";
  12.    for (process_link **lp = &po_link; *lp; )
  13. {
  14. process_link *sv = *lp;
  15. *lp = sv->pl_next;
  16. process *tp = sv->pl_process;
  17.  
  18. if (tp->t_curstate == TASK_IDLE)
  19.     tp->wakeup(0);
  20.  
  21. delete sv;
  22. }
  23.  
  24.    po_link = 0;
  25.    if (debug) /*DELETE*/ cerr << "<<<< process_object" << this << "::alert()\n";
  26.  
  27.